package com.codingvip.jedis;

import redis.clients.jedis.Jedis;
import redis.clients.jedis.JedisPool;

/**
 * @author hansongtao
 */
public class JimuRedisPool {
    private JedisPool jedisPool;

    public JimuRedisPool() {
        this.jedisPool = new JedisPool();
    }



    public void execute(CallWithJedis caller) {
        try (Jedis jedis = jedisPool.getResource()) {
            caller.call(jedis);
        }
    }
}
